import { DialogConfig } from '@/components/mm-dialog/type'

export const dialogConfig: DialogConfig = {
  width: 470,
  showLabel: true,
  labelWidth: 80,
  layout: [
    {
      formItems: [
        {
          label: '角色名称',
          prop: 'name',
          type: 'input',
          placeholder: '请输入角色名称',
          rules: [
            { required: true, message: '必填项不能为空', trigger: 'blur' },
            { max: 16, message: '不能超过 16 个字符', trigger: 'blur' }
          ]
        }
      ]
    },
    {
      formItems: [
        {
          label: '状态',
          prop: 'status',
          type: 'switch',
          bind: {
            inactiveValue: 0,
            activeValue: 1
          }
        }
      ]
    },
    {
      formItems: [
        {
          label: '描述',
          prop: 'description',
          type: 'textarea',
          placeholder: '请输入描述',
          bind: {
            rows: 3
          }
        }
      ]
    }
  ]
}
